package cn.fangline.wo.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author 抽离
 * @since 2017-05-03
 */
public class Message extends Model<Message> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 消息类型：分享，换名片，
     */
	@TableField("msg_type")
	private Integer msgType;
    /**
     * 消息内容
     */
	@TableField("msg_content")
	private String msgContent;
    /**
     * 房源编号
     */
	@TableField("house_id")
	private Long houseId;
    /**
     * 封面
     */
	@TableField("img_url")
	private String imgUrl;
    /**
     * 发送者
     */
	@TableField("send_user")
	private Long sendUser;
    /**
     * 接收者
     */
	@TableField("recv_user")
	private Long recvUser;
    /**
     * 发送时间
     */
	@TableField("send_time")
	private Date sendTime;
    /**
     * 冗余user表的avatar_url字段
     */
	@TableField("avatar_url")
	private String avatarUrl;
    /**
     * 冗余user表的user_name字段
     */
	@TableField("user_name")
	private String userName;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getMsgType() {
		return msgType;
	}

	public void setMsgType(Integer msgType) {
		this.msgType = msgType;
	}

	public String getMsgContent() {
		return msgContent;
	}

	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}

	public Long getHouseId() {
		return houseId;
	}

	public void setHouseId(Long houseId) {
		this.houseId = houseId;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public Long getSendUser() {
		return sendUser;
	}

	public void setSendUser(Long sendUser) {
		this.sendUser = sendUser;
	}

	public Long getRecvUser() {
		return recvUser;
	}

	public void setRecvUser(Long recvUser) {
		this.recvUser = recvUser;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getAvatarUrl() {
		return avatarUrl;
	}

	public void setAvatarUrl(String avatarUrl) {
		this.avatarUrl = avatarUrl;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
